import LayoutApp from '@/pages/Layout'
import Login from '@/pages/Login'
import { AuthRouter } from '@/components/Authrouter'

import { createBrowserRouter } from 'react-router-dom'
import Home from '@/pages/Home'
import Publish from '@/pages/Publish'
import Article from '@/pages/Article'

const router =  createBrowserRouter([
  {
    path: '/',
    // element: <AuthRouter><LayoutApp/></AuthRouter>,
    element: <LayoutApp/>,
    children: [
      {
        index: true,
        element: <Home/>,
      },
      {
        path: '/article',
        element: <Article/>,
      },
      {
        path: '/publish',
        element: <Publish/>,
      },
    ]
  },
  {
    path: '/login',
    element: <Login></Login>
  },
])

export default router;